<template>
  <div class="app-container">

    <div class="table">
      <h2 class="table-caption">结题级别情况</h2>
      <div class="table-column-group">
        <div class="table-column"></div>
        <div class="table-column"></div>
        <div class="table-column"></div>
      </div>
      <div class="table-header-group">
        <ul class="table-row">
          <li class="table-cell">结题总数</li>
          <li class="table-cell">国家级</li>
          <li class="table-cell">区级</li>
        </ul>
      </div>
      <div class="table-row-group">
        <ul class="table-row">
          <li class="table-cell">{{ conclusionCensus.count }}</li>
          <li class="table-cell">{{ conclusionCensus.nationalLevel }}</li>
          <li class="table-cell">{{ conclusionCensus.districtLevel }}</li>
        </ul>
      </div>
    </div>

    <div class="table" style="margin-top: 50px">
      <h2 class="table-caption">结题获奖情况</h2>
      <div class="table-column-group">
        <div class="table-column"></div>
        <div class="table-column"></div>
        <div class="table-column"></div>
      </div>
      <div class="table-header-group">
        <ul class="table-row">
          <li class="table-cell">特等奖</li>
          <li class="table-cell">一等奖</li>
          <li class="table-cell">二等奖</li>
          <li class="table-cell">三等奖</li>
          <li class="table-cell">优秀奖</li>
          <li class="table-cell">无</li>
        </ul>
      </div>
      <div class="table-row-group">
        <ul class="table-row">
          <li class="table-cell">{{ conclusionCensus.grandPrize }}</li>
          <li class="table-cell">{{ conclusionCensus.firstPrize }}</li>
          <li class="table-cell">{{ conclusionCensus.secondPrize }}</li>
          <li class="table-cell">{{ conclusionCensus.thirdPrize }}</li>
          <li class="table-cell">{{ conclusionCensus.excellencePrize }}</li>
          <li class="table-cell">{{ conclusionCensus.nothing }}</li>
        </ul>
      </div>
    </div>

  </div>
</template>

<script>
import { conclusion } from '@/api/census'

export default {
  data() {
    return {
      conclusionCensus: {}
    }
  },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      this.listLoading = true
      conclusion().then(response => {
        this.conclusionCensus = response.data
        this.listLoading = false
      })
    }
  }
}
</script>

<style lang="scss" scoped>
ul{margin:0;padding:0;list-style:none;}
.table{display:table;border-collapse:collapse;border:1px solid #ccc;}
.table-caption{display:table-caption;margin:0;padding:0;font-size:16px;}
.table-column-group{display:table-column-group;}
.table-column{display:table-column;width:100px;}
.table-row-group{display:table-row-group;}
.table-row{display:table-row;}
.table-row-group .table-row:hover,.table-footer-group .table-row:hover{background:#f6f6f6;}
.table-cell{display:table-cell;padding:0 5px;border:1px solid #ccc;}
.table-header-group{display:table-header-group;background:#eee;font-weight:bold;}
.table-footer-group{display:table-footer-group;}
</style>
